package org.softcognito.webcontent.radiomaryja;

public class ItemDetailDTOImpl implements ItemDetailDTO {
	String article = null;
	String audio = null;

	public ItemDetailDTOImpl(String article, String audio) {

		if (audio == null || audio.length() == 0) {
			this.audio = audio;
		} else {
			this.article = article;
		}
	}

	@Override
	public String getArticle() {
		return article;
	}

	public void setArticle(String article) {
		this.article = article;
	}

	@Override
	public String getAudio() {
		return audio;
	}

	public void setAudio(String audio) {
		this.audio = audio;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("  Audio: ").append(this.audio).append("\n");
		sb.append("  Article: ").append(this.article);
		return sb.toString();
	}

	@Override
	public boolean isAudio() {
		return this.audio == null ? false : true;
	}
}
